Configuring the electronic signature data

The data that is included in an electronic signature is entirely up to you. The data should be stored in the built-in Meridian Enterprise property AMDocumentPropertySet._ESIGNATURES. The value of this property is shown when users click the Electronic signatures link on the Document page in PowerUser. The value of BCRenditionPropertySet._ESIGNATURES is used to render signature pages for renditions created by BlueCielo Publisher. If the Show reason option is enabled as described in Configuring authentication, the selected reason is stored in AMDocumentPropertySet._APPROVALREASON. You can combine and format the data from document properties, user input, and any other data available to VBScript.

To configure the electronic signature data:

  1. In Meridian Enterprise Configurator, in the VBScript editor, add code to the event handler that corresponds to the beginning of the workflow for which you enabled electronic signatures as described in Configuring electronic signatures for document type workflow and Configuring electronic signatures for workflow definitions.

    • For document type workflow transitions: DocWorkflowEvent_AfterChangeWFState
    • For workflow definition transitions: ProjectWorkflowEvent_AfterExecuteTransition

    Your code should test for the correct starting transition name and it should empty the property of any electronic signatures that were made for the prior revision of the document similar to the following example.

  1. Add code to the same event handler but for the end workflow transition. Your code should test for the correct end transition name and concatenate the new electronic signature data to any prior electronic signatures that may have been made within the same workflow. Your code should look similar to the following example fragment. This example stores the user's name, the current date, and the reason that the user entered when they signed the document.

Sub DocCWFEvent_AfterExecuteTransition(Batch, Transition, Person, Manager, Comment)
  Select Case Transition.Name
    Case "StartChange"
       'Reset esig status
       Document.ReviewRequired = ReviewRequired
       Document.ApprovalStatus = vbNullString
    Case "Release", "Approve"
       'Append to the workflow log
	Document.Log "Revision " & Document.Revision & " " & Document.ApprovalStatus 
  End Select
    
  Select Case Transition.WorkflowName & "." & Transition.Name
    Case "FDAeSigWorkflow.StartChange", "FDAeSigWorkflow.RejectwithRemarks"
      'Reset esig data on start of a workflow
      Document.Property("AMDocumentPropertySet._ESIGNATURES")="Unsigned Version"
      Document.Property("BCRenditionPropertySet._ESIGNATURES")="Unsigned Version"
    Case "FDAeSigWorkflow.Approve"
      'Append esig data to existing
      If Left(Ucase(Document.Property("AMDocumentPropertySet._ESIGNATURES")),8) _
        <> "UNSIGNED" Then

     	 Document.Property("AMDocumentPropertySet._ESIGNATURES")= _
        Document.Property("AMDocumentPropertySet._ESIGNATURES") & _
        vbNewLine & "Signed by " & User.FullName & " on: " & _
        GMTTime2Local(Vault.ServerTimeGMT) & " " & _
        Document.Property("AMDocumentPropertySet._APPROVALREASON")

        Document.Property("BCRenditionPropertySet._ESIGNATURES")= _
        Document.Property("BCRenditionPropertySet._ESIGNATURES") & _
        vbNewLine & "Signed by " & User.FullName & " on: " & _
        GMTTime2Local(Vault.ServerTimeGMT) & " " & _
        Document.Property("AMDocumentPropertySet._APPROVALREASON")   
      Else
        'Save initial esig data
    	 Document.Property("AMDocumentPropertySet._ESIGNATURES")= _
        "Signed by " & User.FullName & " on: " & _
        GMTTime2Local(Vault.ServerTimeGMT) & " " & _
        Document.Property("AMDocumentPropertySet._APPROVALREASON")

        Document.Property("BCRenditionPropertySet._ESIGNATURES")= _
        "Signed by " & User.FullName & " on: " & _
        GMTTime2Local(Vault.ServerTimeGMT) & " " & _
        Document.Property("AMDocumentPropertySet._APPROVALREASON")
      End If 
  End Select
End Sub